package com.jt.controller;

import com.alibaba.fastjson.JSON;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2017/3/30.
 */
@RestController
public class CallController {

    private static Logger logger = LoggerFactory.getLogger(CallController.class);

    @Autowired
    DiscoveryClient discoveryClient;

    @RequestMapping(value = "/call", method = RequestMethod.GET)
    public String call(){
        logger.info(JSON.toJSONString(discoveryClient));
        return "server-A";
    }

}
